//
//  chooseContentCell.m
//  LyhToolsTest
//
//  Created by daojial on 2019/8/25.
//  Copyright © 2019 LYH.com. All rights reserved.
//

#import "chooseContentCell.h"

@interface chooseContentCell ()
@property (nonatomic, strong) UILabel *labContent; //内容

@property (nonatomic, strong) UIButton *btnCopy; //复制
@property (nonatomic, strong) UIView *viewGrey; //灰色view
@end
@implementation chooseContentCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initUI];
        
    }
    return self;
}
- (void)initUI
{
    UIView *contentView = self.contentView;
    NSArray *views = @[self.labContent,self.btnCopy,self.viewGrey];
    [contentView sd_addSubviews:views];
    
    self.viewGrey.sd_layout.spaceToSuperView(UIEdgeInsetsMake(15, 15, 0, 15));
    self.labContent.sd_layout.leftSpaceToView(self.viewGrey, 5).topSpaceToView(self.viewGrey, 10)
    .rightSpaceToView(self.viewGrey, 5);
    
    
}

#pragma -mark === 复制
- (void)copyClick
{
    
}
- (UIView *)viewGrey
{
    if (!_viewGrey) {
        _viewGrey = [[UIView alloc]init];
        _viewGrey.backgroundColor = [UIColor grayColor];
    }
    return _viewGrey;
}
- (UILabel *)labContent
{
    if (!_labContent) {
        _labContent = [UILabel labelWithText:@"内容" font:14 textColor:[UIColor darkTextColor] frame:CGRectZero];
    }
    return _labContent;
}
- (UIButton *)btnCopy
{
    if (!_btnCopy) {
        _btnCopy = [UIButton buttonWithTitle:@"复制" titleColor:[UIColor redColor] backgroundColor:[UIColor whiteColor] font:14 image:@"" target:self action:@selector(copyClick) frame:CGRectZero];
    }
    return _btnCopy;
}
@end
